<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>实体列表</title>
	 <script type="text/javascript" src="/script/mootools.js"></script>
    <script type="text/javascript" src="/script/mootools-more.js"></script>
    <link rel="stylesheet" type="text/css" href="/script/jspxnet-ui.css"/>
    <script type="text/javascript" src="/script/jspxnet.js"></script>
    <script type="text/javascript" src="/script/jspxnet-ui-roc.js"></script>
    <link rel="stylesheet" type="text/css" href="/script/jspxnet-ui.css"/>
    <link href="/share/mskin/default/devcenter.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript">
		function operatePlugWin(className)
		{
			  window.open('/devcenter/operatepluglist.html?className='+className, "插件管理");
		};

		function fieldManageWin(className)
		{
			  window.open('/devcenter/columnlist.html?className='+className, "字段管理");
		};
		
		function openVFormWin(name)
		{
			  window.open('/devcenter/vform/index.html?tableName='+name, "表单设计");
		};

        window.addEvent('domready', function() {
           var columnModels =
                    [
						
						{
                            name: "id",
                            caption: "ID",
                            type: "string",
                            edit: true,
                            input: "text",
                            align: "left",
                            width: 240
                        },
                        {
                            name: "caption",
                            caption: "名称",
                            type: "string",
                            edit: true,
                            input: "text",
                            align: "left",
                            width: 120
                        },
                        {
                            name: "name",
                            caption: "表名",
                            type: "string",
                            edit: true,
                            input: "text",
                            align: "left",
                            width: 200
                        },
                        {
                            name: "create",
                            caption: "实表",
                            type: "string",
                            edit: true,
                            input: "text",
                            align: "left",
                            width: 40
                        },
                        {
                            name: "className",
                            caption: "类路径",
                            type: "string",
                            edit: true,
                            input: "text",
                            align: "left",
                            width: 280
                        },
				        {
                            name: "isCanExtend",
                            caption: "扩展",
                            type: "bool",
                            edit: true,
                            input: "text",
                            align: "left",
                            width: 80
                        },
						{
						   name: '',
						   caption:"插件",type:"jIcoConfig",
						   edit: true,
						   input: "button",
						   width: 65,
						   link: 'javascript:operatePlugWin("{className}");'
						},
						{
						   name: '',
						   caption:"字段",type:"jIcoManageTable",
						   edit: true,
						   input: "button",
						   width: 65,
						   link: 'javascript:fieldManageWin("{className}");'
						},
						{
						   name: '',
						   caption:"表单",type:"jIcoManageTable",
						   edit: true,
						   input: "button",
						   width: 65,
						   link: 'javascript:openVFormWin("{name}");'
						}
						
                    ];
            var buttons = [];
            
            buttons.push(new Element('div', {'class':'btnseparator'}));
            var fen = new Element('label', {'html':'&nbsp;|&nbsp;','styles':{'float':'left','color':'#ffffff'}});
            buttons.push(fen);
            var findBox = new Element('input', {'type':'text','name':'find','id':'find'});
            var labelFind = new Element('label', {'html':'关键字','styles':{'float':'left'}});
            labelFind.adopt(findBox);
            buttons.push(labelFind);
          

			var fen0 = new Element('label', {'html':'&nbsp;|&nbsp;','styles':{'color':'#ffffff'}});
			buttons.push(fen0);
			extendBox0 = new Element('input', {'type':'radio','name':'extend','id':'extendBox0','value':'0'});

			var labelExtend0 = new Element('label', {'styles':{'float':'left'}});
			labelExtend0.adopt(extendBox0);
			labelExtend0.appendText('所有');
		    buttons.push(labelExtend0);
			
			var fen2 = new Element('label', {'html':'&nbsp;|&nbsp;','styles':{'color':'#ffffff'}});
			buttons.push(fen2);
			extendBox2 = new Element('input', {'type':'radio','name':'extend','id':'extendBox1','value':'1'});
			var labelExtend2 = new Element('label', {'styles':{'float':'left'}});
			labelExtend2.adopt(extendBox2);
			labelExtend2.appendText('可扩展');
			
		    buttons.push(labelExtend2);
			
			var fen3 = new Element('label', {'html':'&nbsp;|&nbsp;','styles':{'color':'#ffffff'}});
			buttons.push(fen3);
			
			extendBox2 = new Element('input', {'type':'radio','name':'extend','id':'extendBox2','value':'2'});
			var labelExtend2 = new Element('label', {'styles':{'float':'left'}});
			labelExtend2.adopt(extendBox2);
			labelExtend2.appendText('不可扩展');
		    buttons.push(labelExtend2);

			var fen3 = new Element('label', {'html':'&nbsp;|&nbsp;','styles':{'color':'#ffffff'}});
			buttons.push(fen3);
			
			buttons.push(new Element('button', {'type':'button','class':'jTDRefresh','html':'搜索',
                'events':
                    {
                        'click': function(event)
                        {
							var isExtend = getRadioValue('input[name=extend]');
							var param = {find:findBox.get('value'),'dto':true,'extend':isExtend};
                            jtable.loadData('/devcenter/codemaker/list/table.jwc',param);
                            return false;
                        }
                    }
            }));
			
            jtable = new JDataTable({table:"grid",title:'实体列表',url:'/devcenter/codemaker/list/table.jwc',
                accordion:true,
                autoSectionToggle:false,
                showTog:true, //显示详细
                editMode:false,
                columnModels:columnModels,
                buttons:buttons,
                pagination:true,
                serverSort:true,
                showCaption: true,
                sortCaption: true,
                alternaterows: true,
                resizeColumns: true,
                multiselect:true
            });
        });
    </script>
</head>
<body jskin="true">
<div class="mWrap">
    <div class="mTitPanel jboardLogo">实体列表</div>
    <div class="mConPanel">
        <div id="helpTip"></div>
        <div id="grid"></div>
    </div>
</div>
</body>
</html>
